import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

import "@/mock/index.js"
import "@/styles/global.less";
import {showMessage} from "@/utils/index.js";
import "@/eventBus.js";

Vue.prototype.$showMessage = showMessage;//扩展vue实例成员




//注册全局指令：Vue.directive(指令名，指令配置对象)
import vLoading from "./directives/loading";
import vLazy from "./directives/lazy.js";
Vue.directive("loading",vLoading);
Vue.directive('lazy',vLazy);


store.dispatch('setting/fetchSetting');//获取全局设置

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
